﻿<div id="about-example">

    <h2>
        <span class="viewengine-switch">
            <span class="selected-engine">Razor</span>
            @*@(Html.ActionLink("ASPX",
                                (string)ViewContext.RouteData.Values["action"],
                                new { area = "Aspx", controller = (string)ViewContext.RouteData.Values["controller"] },
                                new { @class = "t-link" }))*@

        </span>
    </h2>

    @(Html.EasyUI().TabStrip()
                            .Name("code-viewer-tabs")
                            .Items(tabstrip =>
                            {
                                bool hasDescription = !string.IsNullOrEmpty((ViewData["Description"] ?? "").ToString());
                                if (hasDescription)
                                {
                                    @*tabstrip.Add()
                                        .Text("Description")
                                        .Content(
                                            @<div class="description">@ViewData["Description"] </div>);*@

                                }

                                var codeFiles = ViewData.Get<Dictionary<string, string>>("codeFiles");

                                foreach (var codeFile in codeFiles)
                                {
                                    tabstrip.Add()
                                .Text(codeFile.Key)
                                .LoadContentFrom("CodeFile", "Home", new { file = codeFile.Value });
                                }
                            })
                                            .SelectedIndex(0)
                                            .ClientEvents(events => events.OnLoad("codeTabLoad"))
    )
</div>